Dynomotion

Group: DynoMotion Message: 10451 From: wgripp Date: 11/2/2014
Subject: Another Step-Response plot utility

Hi,


I wanted to share a small utility I wrote to have a plot similar to the Step Response one. I wrote this mainly because I needed to check the step response of both Y axes in my cnc router, a closed loop stepper system with a slaved 2-screw Y axis.


The program may be useful in other conditions too, as monitoring the error during normal machine operation, albeith I will be conducting more tests to check if USB gets choked by data transmission.


The C part of the utility is largely based on one of the samples, but data starts to get collected only while virtual bit 2000 is  true. This allows to start  data gather with an MCode, as I did in KmotionCNC, see .ngc file attached. To avoid choking the USB I added some WaitForNextTimeSlice in the loop that writes the file, but still need to check whether it is needed (and the solution effective).


The frontend is written in Lua, using the Iup gui library. To be able tu run it the easiest way looks like to download and install LuaForWindows, or LuadDist. I wrote this in Lua mainly to have some grasp of the language.


Any comments or criticism very welcome !


  @@attachment@@
Group: DynoMotion Message: 10453 From: Tom Kerekes Date: 11/2/2014
Subject: Re: Another Step-Response plot utility [4 Attachments]
Nice only 200 lines of code!

But I wasn't able to get it to compile or run.  I installed Lua from Google,


ran the "C:\Program Files\Lua\5.1\SciTE\SciTE.exe" on my desktop,

loaded your Lua file.  It seems to always hang on the initial "require" library statements.

Regards
TK


From: "wgripp@... [DynoMotion]" <DynoMotion@yahoogroups.com>
To: DynoMotion@yahoogroups.com
Sent: Sunday, November 2, 2014 1:01 PM
Subject: [DynoMotion] Another Step-Response plot utility [4 Attachments]

 
Hi,

I wanted to share a small utility I wrote to have a plot similar to the Step Response one. I wrote this mainly because I needed to check the step response of both Y axes in my cnc router, a closed loop stepper system with a slaved 2-screw Y axis.

The program may be useful in other conditions too, as monitoring the error during normal machine operation, albeith I will be conducting more tests to check if USB gets choked by data transmission.

The C part of the utility is largely based on one of the samples, but data starts to get collected only while virtual bit 2000 is  true. This allows to start  data gather with an MCode, as I did in KmotionCNC, see .ngc file attached. To avoid choking the USB I added some WaitForNextTimeSlice in the loop that writes the file, but still need to check whether it is needed (and the solution effective).

The frontend is written in Lua, using the Iup gui library. To be able tu run it the easiest way looks like to download and install LuaForWindows, or LuadDist. I wrote this in Lua mainly to have some grasp of the language.

Any comments or criticism very welcome !



Group: DynoMotion Message: 10463 From: wgripp Date: 11/2/2014
Subject: Re: Another Step-Response plot utility
Hello,

I should have mentioned this in the first post ! Running from Scite won't work in my pc too, it seems that not all paths are correctly set in the editor.

On the pc where I have LuaForWindows I just double click on the KFlopPlot2x.lua file, on the pc where I have LuaDist (basically a "xcopy" installation) I just drag and drop the file on the lua.exe, in the bin directory; DND on wlua.exe is the same, except that the Lua console won't show. Please let me know if it's working.


Regards,
Gianluigi
Group: DynoMotion Message: 10464 From: wgripp Date: 11/3/2014
Subject: Re: Another Step-Response plot utility
Mhmmm just saw that the Lua file I uploaded is a tiny bit outdated, still works but legends on plts are plain wrong, please see this other one (with some more added sanity in populating each dataset).

On a side note, what values of the chX->integrator are to be expected ?

Regards, Gianluigi
  @@attachment@@